Addition of Inertia::response to handle both json and component #664
Closed
Sarojb31 wants to merge 5 commits intoinertiajs:1.xfrom
Closed
Addition of Inertia::response to handle both json and component #664Sarojb31 wants to merge 5 commits intoinertiajs:1.xfrom
Sarojb31 wants to merge 5 commits intoinertiajs:1.xfrom
Conversation
It allows to send the json response from same function used to serve the Inertia Render Headers can be passed on request Accept:application/json for the json response By default it will work as the normal render function
Contributor
|
Closing this as we're not adding any new features or non-emergency fixes for 1.x. If this is still an issue in 2.x please submit a new PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addition of Inertia::reponse to allow the single route to behave as API that sends props as JSON response if the header is set to 'Accept:application/json' and behave exact to render function if the following header is not matched